<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
    <!-- Safari为meta标签新增minimal-ui属性，在网页加载时隐藏地址栏与导航栏 -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minxmum-scale=1.0, user-scalable=no, minimal-ui">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="format-detection" content="telephone=no">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title>东湖绿道</title>
    <link rel="stylesheet" href="<?=HW_STA?>weixin/css/weuix.min.css"/>
    <link rel="stylesheet" href="<?=HW_STA?>weixin/css/weui.min.css"/>
    <link rel="stylesheet" type="text/css" href="<?=HW_STA?>weixin/css/style.css">
	<link rel="stylesheet" href="<?=HW_CSS?>AppFont/iconfont.css">

</head>
<body class='setting'>
	<div class="dh-header">
		<a class="left" href='javascript:history.go(-1)'>
			<i class="iconfont">&#xe81f;</i>
		</a>
		<div class="center">
			个人设置
		</div>
	</div>
	<div class="weui-cells weui-cells_form">
		<div class="weui-cell weui-cell_switch">
			<div class="weui-cell__bd">不在排行榜上显示排名</div>
			<div class="weui-cell__ft">
				<input class="weui-switch" type="checkbox" <?=$info['is_online']==1?'checked':''?> name="is_online"  value="<?=$info['is_online']==1?0:1?>" />
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="<?=HW_JS?>jquery-2.0.2.min.js"></script>
<script type="text/javascript" src="<?=HW_STA?>weui/weui.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="<?=HW_JS?>rem.js"></script>
<script>
	$("input[name='is_online']").change(function(){
		var is_online = $(this).val();
		var change = is_online==1?0:1;
		console.log(is_online);
		$.post("<?=base_url().'Weixin/Index/change_online'?>",{user_id:<?=$info['id']?>,is_online:is_online},function(data){
			if (data.code==1) {
				$(this).val(change);
			}
		},'json')	
	})
</script>
</html>

